package io;

import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.io.*;

public class Read {
    public static void main(String[] args)  {


    }


    //小型文本编辑器
    public static void text() throws IOException{
        BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
        String str[]=new String[100];
        System.out.println("Enter lines of text.");
        System.out.println("Enter 'stop' to quit.");
        for(int i=0;i<100;i++){
            int lines=i+1;
            System.out.print("第"+lines+"行：");
            str[i]=bf.readLine();
            if(str[i].equals("stop")) {
                break;
            }
        }

        System.out.println("\nHere is your file:");

        for(int i=0;i<100;i++){
            if(!str[i].equals("stop")){
                System.out.println(str[i]);
            }
            else {
                break;
            }
        }
    }
}
